
//获取url传参
export function getQueryParams(url: string) {
    const paramArr = url.slice(url.indexOf("?") + 1).split("&");
    const params = {};
    paramArr.map((param) => {
        const [key, val] = param.split("=");
        params[key] = decodeURIComponent(val);
    });
    return params;
}

// 数值转千分位
export const toMillimeter = (val: any) => {
    if (!Number.isFinite(Number(val))) return '-'
    const num: number = Number(val)
    return num.toLocaleString()
}